package com.example.demo.model;

import javax.persistence.*;
import java.util.Objects;

@Entity
@Table(name = "authority", schema = "mytest", catalog = "")
public class AuthorityEntity {
    private int id;
    private String useLimit;

    @Id
    @Column(name = "id")
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "use_limit")
    public String getUseLimit() {
        return useLimit;
    }

    public void setUseLimit(String useLimit) {
        this.useLimit = useLimit;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        AuthorityEntity that = (AuthorityEntity) o;
        return id == that.id &&
                Objects.equals(useLimit, that.useLimit);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, useLimit);
    }
}
